<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Expect Type</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
</head>

<body>

<h2>Expect</h2>
<h3>Description</h3>
<p>Expect verifies the output of an  Java or System execution 5 seconds after the process 
has started. The following tasks support nested Expect Tasks:
<ul>
<li>RemoteExec</li>
<li>RemoteJava</li>
</ul>
<p>Expect  checks Stdout,Stderr, and also the presence of a file.
  </p>
</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>

    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">file</td>
    <td valign="top">The file to check for.</td>
    <td align="center" valign="middle" rowspan="2">One of the two.</td>
  </tr>
  <tr>
    <td valign="top">stream</td>
    <td valign="top">The outstream (stdout/stderr) to check. 
        Either "out" or "err".</td>
  </tr>
  <tr>
    <td valign="top">not</td>
    <td valign="top">Perform a negative match. In text mode check, that the 
        stream does <b>not</b> contain the CDATA text. In file mode, check that 
        the file does <b>not</b> exist. Default is "false".</td>
    <td align="center" valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">exact</td>
    <td valign="top">Check, that the specified stream contains <b>only</b> the 
        CDATA text. Only available in text mode. Default is "false".</td>
    <td align="center" valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">empty</td>
    <td valign="top">Check, that the specified stream is empty. 
        Only available in text mode. Default is "false".</td>
    <td align="center" valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">timeout</td>
    <td valign="top">The maximum number of seconds to wait for until the
        expected text or file is available. Default is 30 sec.</td>
    <td align="center" valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">erroronfail</td>
    <td valign="top">Produce an Error instead of a Warning if the expected
        condition doesn't hold true. Default is "false".</td>
    <td align="center" valign="top">No</td>
  </tr>
</table>
<h3>Examples</h3>
<pre>  &lt;expect file=&quot;done.txt&quot; timeout=&quot;60&quot;/&gt;
  &lt;expect stream=&quot;out&quot;&gt;Foo&lt;/expect>
</pre>
<hr>
<p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>
</body>
</html>
